
#include <string>
#include <iostream>
#include <cstdlib>

#include "Param.h"
#include "Sqlerr.h"

#include "string.h"
#include "stdio.h"

Param::Param(SQLHENV env, SQLHDBC dbc, SQLHSTMT stmt, SQLUSMALLINT ParameterNumber){
//    InputOutputType = SQL_PARAM_INPUT;
//    ValueType = SQL_C_CHAR;
//    ParameterType = SQL_CHAR;
//    ColumnSize = 100;
//    DecimalDigits = 0;
//    BufferLenght = 0;
//    SQLRETURN retcode = SQLBindParameter( stmt, ParameterNumber, InputOutputType, ValueType, ParameterType, ColumnSize, DecimalDigits, (char*)"zulu", BufferLenght, &StrLen_or_Ind );
    SQLRETURN retcode = SQLBindParameter( stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 0, 0, (char*)"111111111", 30, &StrLen_or_Ind );
    if ( retcode == SQL_ERROR ) {
        std::cerr << __FILE__ << ":" << __LINE__;
        throw Sqlerr(env, dbc, stmt);
    }
};

void Param::fromString(std::string value){
//    std::cout << ParameterValue << std::endl;
//    value.copy( ParameterValue, 100);
//    ParameterValue = value;
};

Param::~Param()
{
};
